==================================================
Batch in queue: 'Graphics', (0)
--------------------------------------------------
name: 'RayQuery1 |0| Upload RTAS task'
{

  PipelineBarrier2
    dependencyFlags: 0
    MemoryBarrier:
      stage:  HOST ---> COPY
      access: HOST_WRITE ---> TRANSFER_WRITE
  ----------

  CopyBuffer
    src: 'SSWB {f:1} {q:Graphics}'
    dst: 'RTAS vertex buffer'
      copy [0, 48) ---> [0, 48)
  ----------

  CopyBuffer
    src: 'SSWB {f:1} {q:Graphics}'
    dst: 'RTAS index buffer'
      copy [64, 76) ---> [0, 12)
  ----------

  CopyBuffer
    src: 'SSWB {f:1} {q:Graphics}'
    dst: 'RTAS instance buffer'
      copy [128, 192) ---> [0, 64)
  ----------

  PipelineBarrier2
    dependencyFlags: 0
    MemoryBarrier:
      stage:  COPY ---> ACCELERATION_STRUCTURE_BUILD
      access: TRANSFER_WRITE ---> SHADER_READ | ACCELERATION_STRUCTURE_READ
  ----------

  BuildAccelerationStructures
    dstAS: 'RT geometry'
    scratch: 'RTAS scratch buffer', offset: 0
    type: BottomLevel
    mode: Build
    [0] Triangles
      vertexData:    'RTAS vertex buffer', offset: 0
      indexData:     'RTAS index buffer', offset: 0
      transformData: null
    ----
  ----------

  PipelineBarrier2
    dependencyFlags: 0
    MemoryBarrier:
      stage:  ACCELERATION_STRUCTURE_BUILD ---> ACCELERATION_STRUCTURE_BUILD
      access: ACCELERATION_STRUCTURE_READ | ACCELERATION_STRUCTURE_WRITE ---> SHADER_READ | ACCELERATION_STRUCTURE_READ
  ----------

  BuildAccelerationStructures
    dstAS: 'RT scene'
    scratch: 'RTAS scratch buffer', offset: 0
    type: TopLevel
    mode: Build
    [0] Instances
      data: 'RTAS instance buffer', offset: 0
    ----
  ----------

}
--------------------------------------------------
name: 'RayQuery1 |1| Ray tracing task'
{

  PipelineBarrier2
    dependencyFlags: 0
    MemoryBarrier:
      stage:  ACCELERATION_STRUCTURE_BUILD ---> COMPUTE_SHADER
      access: ACCELERATION_STRUCTURE_READ | ACCELERATION_STRUCTURE_WRITE ---> ACCELERATION_STRUCTURE_READ
    ImageBarrier:
      name:    'Image'
      stage:   COMPUTE_SHADER ---> COMPUTE_SHADER
      access:  0 ---> SHADER_STORAGE_WRITE
      layout:  UNDEFINED ---> GENERAL
  ----------

  BindPipeline
    pipeline:  'rquery1.def'
    layout:    '9', DSCount: 1
    bindPoint: COMPUTE
  ----------

  Dispatch
    descriptors:
    [0] pl: '9'
      image: 'Image', layout: GENERAL
      accel struct: 'RT scene'
  ----------

  PipelineBarrier2
    dependencyFlags: 0
    ImageBarrier:
      name:    'Image'
      stage:   COMPUTE_SHADER ---> COPY
      access:  SHADER_STORAGE_WRITE ---> TRANSFER_READ
      layout:  GENERAL ---> TRANSFER_SRC_OPTIMAL
  ----------

}
--------------------------------------------------
name: 'RayQuery1 |2| Readback task'
{
  CopyImageToBuffer
    src:       'Image'
    srcLayout: TRANSFER_SRC_OPTIMAL
    dst:       'dynamic staging buffer'
      copy { off:(0, 0, 0), ext:(800, 600, 1), COLOR } ---> { [0, 1920000) }
  ----------

  PipelineBarrier2
    dependencyFlags: 0
    MemoryBarrier:
      stage:  COPY ---> HOST
      access: TRANSFER_WRITE ---> HOST_READ
  ----------

}
--------------------------------------------------
signalSemaphore = {
  'sync-0',  stage: ALL_COMMANDS
}
==================================================
==================================================
Batch in queue: 'Graphics', (0)
--------------------------------------------------
name: 'RayQuery1 |0| Upload RTAS task'
{

  PipelineBarrier2
    dependencyFlags: 0
    MemoryBarrier:
      stage:  HOST ---> COPY
      access: HOST_WRITE ---> TRANSFER_WRITE
  ----------

  CopyBuffer
    src: 'SSWB {f:0} {q:Graphics}'
    dst: 'RTAS vertex buffer'
      copy [0, 48) ---> [0, 48)
  ----------

  CopyBuffer
    src: 'SSWB {f:0} {q:Graphics}'
    dst: 'RTAS index buffer'
      copy [64, 76) ---> [0, 12)
  ----------

  CopyBuffer
    src: 'SSWB {f:0} {q:Graphics}'
    dst: 'RTAS instance buffer'
      copy [128, 192) ---> [0, 64)
  ----------

  PipelineBarrier2
    dependencyFlags: 0
    MemoryBarrier:
      stage:  COPY ---> ACCELERATION_STRUCTURE_BUILD
      access: TRANSFER_WRITE ---> SHADER_READ | ACCELERATION_STRUCTURE_READ
  ----------

  BuildAccelerationStructures
    dstAS: 'RT geometry'
    scratch: 'RTAS scratch buffer', offset: 0
    type: BottomLevel
    mode: Build
    [0] Triangles
      vertexData:    'RTAS vertex buffer', offset: 0
      indexData:     'RTAS index buffer', offset: 0
      transformData: null
    ----
  ----------

  PipelineBarrier2
    dependencyFlags: 0
    MemoryBarrier:
      stage:  ACCELERATION_STRUCTURE_BUILD ---> ACCELERATION_STRUCTURE_BUILD
      access: ACCELERATION_STRUCTURE_READ | ACCELERATION_STRUCTURE_WRITE ---> SHADER_READ | ACCELERATION_STRUCTURE_READ
  ----------

  BuildAccelerationStructures
    dstAS: 'RT scene'
    scratch: 'RTAS scratch buffer', offset: 0
    type: TopLevel
    mode: Build
    [0] Instances
      data: 'RTAS instance buffer', offset: 0
    ----
  ----------

}
--------------------------------------------------
name: 'RayQuery1 |1| Ray tracing task'
{

  PipelineBarrier2
    dependencyFlags: 0
    MemoryBarrier:
      stage:  ACCELERATION_STRUCTURE_BUILD ---> COMPUTE_SHADER
      access: ACCELERATION_STRUCTURE_READ | ACCELERATION_STRUCTURE_WRITE ---> ACCELERATION_STRUCTURE_READ
    ImageBarrier:
      name:    'Image'
      stage:   COMPUTE_SHADER ---> COMPUTE_SHADER
      access:  0 ---> SHADER_STORAGE_WRITE
      layout:  UNDEFINED ---> GENERAL
  ----------

  BindPipeline
    pipeline:  'rquery1.def'
    layout:    '9', DSCount: 1
    bindPoint: COMPUTE
  ----------

  Dispatch
    descriptors:
    [0] pl: '9'
      image: 'Image', layout: GENERAL
      accel struct: 'RT scene'
  ----------

  PipelineBarrier2
    dependencyFlags: 0
    ImageBarrier:
      name:    'Image'
      stage:   COMPUTE_SHADER ---> COPY
      access:  SHADER_STORAGE_WRITE ---> TRANSFER_READ
      layout:  GENERAL ---> TRANSFER_SRC_OPTIMAL
  ----------

}
--------------------------------------------------
name: 'IndirectCmdBuffers'
{
  CopyImageToBuffer
    src:       'Image'
    srcLayout: TRANSFER_SRC_OPTIMAL
    dst:       'dynamic staging buffer'
      copy { off:(0, 0, 0), ext:(800, 600, 1), COLOR } ---> { [0, 1920000) }
  ----------

  PipelineBarrier2
    dependencyFlags: 0
    MemoryBarrier:
      stage:  COPY ---> HOST
      access: TRANSFER_WRITE ---> HOST_READ
  ----------

}
--------------------------------------------------
signalSemaphore = {
  'sync-1',  stage: ALL_COMMANDS
}
==================================================
==================================================
Batch in queue: 'Graphics', (0)
--------------------------------------------------
name: 'IndirectCmdBuffers'
{

  PipelineBarrier2
    dependencyFlags: 0
    MemoryBarrier:
      stage:  HOST ---> COPY
      access: HOST_WRITE ---> TRANSFER_WRITE
  ----------

  CopyBuffer
    src: 'SSWB {f:1} {q:Graphics}'
    dst: 'RTAS vertex buffer'
      copy [0, 48) ---> [0, 48)
  ----------

  CopyBuffer
    src: 'SSWB {f:1} {q:Graphics}'
    dst: 'RTAS index buffer'
      copy [64, 76) ---> [0, 12)
  ----------

  CopyBuffer
    src: 'SSWB {f:1} {q:Graphics}'
    dst: 'RTAS instance buffer'
      copy [128, 192) ---> [0, 64)
  ----------

  PipelineBarrier2
    dependencyFlags: 0
    MemoryBarrier:
      stage:  COPY ---> ACCELERATION_STRUCTURE_BUILD
      access: TRANSFER_WRITE ---> SHADER_READ | ACCELERATION_STRUCTURE_READ
  ----------

  BuildAccelerationStructures
    dstAS: 'RT geometry'
    scratch: 'RTAS scratch buffer', offset: 0
    type: BottomLevel
    mode: Build
    [0] Triangles
      vertexData:    'RTAS vertex buffer', offset: 0
      indexData:     'RTAS index buffer', offset: 0
      transformData: null
    ----
  ----------

  PipelineBarrier2
    dependencyFlags: 0
    MemoryBarrier:
      stage:  ACCELERATION_STRUCTURE_BUILD ---> ACCELERATION_STRUCTURE_BUILD
      access: ACCELERATION_STRUCTURE_READ | ACCELERATION_STRUCTURE_WRITE ---> SHADER_READ | ACCELERATION_STRUCTURE_READ
  ----------

  BuildAccelerationStructures
    dstAS: 'RT scene'
    scratch: 'RTAS scratch buffer', offset: 0
    type: TopLevel
    mode: Build
    [0] Instances
      data: 'RTAS instance buffer', offset: 0
    ----
  ----------

  PipelineBarrier2
    dependencyFlags: 0
    MemoryBarrier:
      stage:  ACCELERATION_STRUCTURE_BUILD ---> COMPUTE_SHADER
      access: ACCELERATION_STRUCTURE_READ | ACCELERATION_STRUCTURE_WRITE ---> ACCELERATION_STRUCTURE_READ
    ImageBarrier:
      name:    'Image'
      stage:   COMPUTE_SHADER ---> COMPUTE_SHADER
      access:  0 ---> SHADER_STORAGE_WRITE
      layout:  UNDEFINED ---> GENERAL
  ----------

  BindPipeline
    pipeline:  'rquery1.def'
    layout:    '9', DSCount: 1
    bindPoint: COMPUTE
  ----------

  Dispatch
    descriptors:
    [0] pl: '9'
      image: 'Image', layout: GENERAL
      accel struct: 'RT scene'
  ----------

  PipelineBarrier2
    dependencyFlags: 0
    ImageBarrier:
      name:    'Image'
      stage:   COMPUTE_SHADER ---> COPY
      access:  SHADER_STORAGE_WRITE ---> TRANSFER_READ
      layout:  GENERAL ---> TRANSFER_SRC_OPTIMAL
  ----------

}
--------------------------------------------------
name: 'RayQuery1 |2| Readback task'
{
  CopyImageToBuffer
    src:       'Image'
    srcLayout: TRANSFER_SRC_OPTIMAL
    dst:       'dynamic staging buffer'
      copy { off:(0, 0, 0), ext:(800, 600, 1), COLOR } ---> { [0, 1920000) }
  ----------

  PipelineBarrier2
    dependencyFlags: 0
    MemoryBarrier:
      stage:  COPY ---> HOST
      access: TRANSFER_WRITE ---> HOST_READ
  ----------

}
--------------------------------------------------
signalSemaphore = {
  'sync-2',  stage: ALL_COMMANDS
}
==================================================
==================================================
Batch in queue: 'Graphics', (0)
--------------------------------------------------
name: 'IndirectCmdBuffers'
{

  PipelineBarrier2
    dependencyFlags: 0
    MemoryBarrier:
      stage:  HOST ---> COPY
      access: HOST_WRITE ---> TRANSFER_WRITE
  ----------

  CopyBuffer
    src: 'SSWB {f:0} {q:Graphics}'
    dst: 'RTAS vertex buffer'
      copy [0, 48) ---> [0, 48)
  ----------

  CopyBuffer
    src: 'SSWB {f:0} {q:Graphics}'
    dst: 'RTAS index buffer'
      copy [64, 76) ---> [0, 12)
  ----------

  CopyBuffer
    src: 'SSWB {f:0} {q:Graphics}'
    dst: 'RTAS instance buffer'
      copy [128, 192) ---> [0, 64)
  ----------

  PipelineBarrier2
    dependencyFlags: 0
    MemoryBarrier:
      stage:  COPY ---> ACCELERATION_STRUCTURE_BUILD
      access: TRANSFER_WRITE ---> SHADER_READ | ACCELERATION_STRUCTURE_READ
  ----------

  BuildAccelerationStructures
    dstAS: 'RT geometry'
    scratch: 'RTAS scratch buffer', offset: 0
    type: BottomLevel
    mode: Build
    [0] Triangles
      vertexData:    'RTAS vertex buffer', offset: 0
      indexData:     'RTAS index buffer', offset: 0
      transformData: null
    ----
  ----------

  PipelineBarrier2
    dependencyFlags: 0
    MemoryBarrier:
      stage:  ACCELERATION_STRUCTURE_BUILD ---> ACCELERATION_STRUCTURE_BUILD
      access: ACCELERATION_STRUCTURE_READ | ACCELERATION_STRUCTURE_WRITE ---> SHADER_READ | ACCELERATION_STRUCTURE_READ
  ----------

  BuildAccelerationStructures
    dstAS: 'RT scene'
    scratch: 'RTAS scratch buffer', offset: 0
    type: TopLevel
    mode: Build
    [0] Instances
      data: 'RTAS instance buffer', offset: 0
    ----
  ----------

  PipelineBarrier2
    dependencyFlags: 0
    MemoryBarrier:
      stage:  ACCELERATION_STRUCTURE_BUILD ---> COMPUTE_SHADER
      access: ACCELERATION_STRUCTURE_READ | ACCELERATION_STRUCTURE_WRITE ---> ACCELERATION_STRUCTURE_READ
    ImageBarrier:
      name:    'Image'
      stage:   COMPUTE_SHADER ---> COMPUTE_SHADER
      access:  0 ---> SHADER_STORAGE_WRITE
      layout:  UNDEFINED ---> GENERAL
  ----------

  BindPipeline
    pipeline:  'rquery1.def'
    layout:    '9', DSCount: 1
    bindPoint: COMPUTE
  ----------

  Dispatch
    descriptors:
    [0] pl: '9'
      image: 'Image', layout: GENERAL
      accel struct: 'RT scene'
  ----------

  PipelineBarrier2
    dependencyFlags: 0
    ImageBarrier:
      name:    'Image'
      stage:   COMPUTE_SHADER ---> COPY
      access:  SHADER_STORAGE_WRITE ---> TRANSFER_READ
      layout:  GENERAL ---> TRANSFER_SRC_OPTIMAL
  ----------

  CopyImageToBuffer
    src:       'Image'
    srcLayout: TRANSFER_SRC_OPTIMAL
    dst:       'dynamic staging buffer'
      copy { off:(0, 0, 0), ext:(800, 600, 1), COLOR } ---> { [0, 1920000) }
  ----------

  PipelineBarrier2
    dependencyFlags: 0
    MemoryBarrier:
      stage:  COPY ---> HOST
      access: TRANSFER_WRITE ---> HOST_READ
  ----------

}
--------------------------------------------------
signalSemaphore = {
  'sync-3',  stage: ALL_COMMANDS
}
==================================================
